/**
 * 这是我自己的Grid
 * 我想把它做成一个可配置的Grid
 * 具体的文档补充完整...
 * @class MyGrid
 * @extends Ext.grid.GridPanel
 */
Ext.ns("com.linkage.extLesson");
com.linkage.extLesson.MyGrid = Ext.extend(Ext.grid.GridPanel, {
	//private
	initComponent : function() {
		this.createTbar();
		com.linkage.extLesson.MyGrid.superclass.initComponent.call(this);
	},
	
    //创建顶部工具栏
    createTbar:function(){
    	this.tbar=[
			{
				text:'添加',
				iconCls:'add'
			},
			{
				text:'删除',
				iconCls:'delete'
			},
			{
				text:'上移',
				iconCls:'up'
			},
			{
				text:'下移',
				iconCls:'down'
			},
			{
				text:'移到最上',
				iconCls:'top'
			},
			{
				text:'移到最下',
				iconCls:'bottom'
			}
		]
    },
    //private
    reCreateRecrod:function(){
    	var cache =new Array();
        for (var i=0; i<this.store.getCount(); i++) {
            cache.push(this.store.getAt(i));
        }
        store.removeAll();
        store.add(cache);
    }
});
Ext.MyGrid=com.linkage.extLesson.MyGrid;